<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<button @click="add"></button>
			<button @click="rmo"></button>
			<ul>
				<li v-for="(item,index) in arr">
					{{index+1}}{{item}}
				</li>
			</ul>
			<h2 v-for="obj in objx" v-bind:title="obj.name">
				{{obj.name}}
				{{obj.sex}}
			</h2>
			<span></span>
		</div>
	</body>
	<script type="text/javascript">
		var app = new Vue({
			el:"#app",
			data:{
				arr:["申福磊","宋雨帆","武如松","陈龙"],
				objx:[
				   {name:"www",sex:"18"},
				   {name:"zzz",sex:"19"}
				]
			},
			methods:{
				add:function(){
					//添加
					this.arr.push("ssss")
				},
				rmo:function(){
					//清除
					this.arr.shift()
				}
			}
		})
	</script>
</html>
